﻿using System;
class WordDecoding
{
    static void Main()
    {
        int[] lettersArray;
        lettersArray = new int[52];
        for (int i = 0; i < 26; i++)
        {
            lettersArray[i] = (i + 65);
        }
        for (int i = 26; i < 52; i++)
        {
            lettersArray[i] = i + 71;
        }
        Console.Write("Please enter word: ");
        string word = Console.ReadLine();
        char[] charArr = word.ToCharArray();
        for (int k = 0; k < charArr.Length; k++)
        {
            int index = Array.BinarySearch(lettersArray, (int)charArr[k]);
            Console.WriteLine("The letter '{0}' is at array position [{1}]", charArr[k], index);
        }
        Console.ReadLine();
    }
}

